Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODObject


AcquireExtension

The AcquireExtension method returns a reference to the specified extension object.

ODExtension AcquireExtension (in ODType extensionName);
extensionName
The name of the extension to acquire. The value of extensionName must be one of the following: kODExtSemanticInterface, kODSettingsExtension, or a part-specific string.
return value
A reference to the specified extension object.
DISCUSSION
Your part calls this method to obtain a reference to an extension object with the specified extension type. If the subclass does not support the specified extension, this method raises an exception. The ODObject class has no inherent extensions of its own and therefore always raises an exception.

Your override of this method should increment the reference count of the returned extension. When you have finished using that extension, you should call its Release method.

OVERRIDING
Your subclass of ODPart can override this method if your part supports extensions. If your part does not support the specified extension, your override method must call its inherited AcquireExtension method at the end of your implementation.

EXCEPTIONS
kODErrUnsupportedExtension
The specified extension is not supported by this object.
SEE ALSO
The ODObject::HasExtension method (page 441).
The ODObject::ReleaseExtension method (page 444).
The ODPart class (page 459).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Using an Extension" on page 444 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
"Making Your Semantic-Interface Extension Available" on page 433 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help